package org.fanximall.erp.product.infrastructure.builder;

import org.fanximall.erp.common.tree.TreeDefinitionModel;
import org.fanximall.erp.product.domain.dto.CategoryTreeModel;
import org.fanximall.erp.product.domain.model.ProductCategoryModel;
import org.fanximall.erp.product.domain.model.ProductLeafCategoryModel;
import org.fanximall.erp.product.infrastructure.dao.entity.ProductCategoryDO;
import org.fanximall.erp.product.infrastructure.dao.entity.ProductLeafCategoryDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import java.util.List;

/**
 * @author :  william
 * @version :  V1.0  created in 2024/4/30
 */
@Mapper(componentModel = "spring")
public interface CategoryBuilder {


    ProductLeafCategoryDO productLeafCategoryDOBuild(ProductLeafCategoryModel productLeafCategoryModel);


    ProductLeafCategoryModel productLeafCategoryModelBuild(ProductLeafCategoryDO productLeafCategoryDO);

    ProductCategoryDO productCategoryDOBuild(ProductCategoryModel categoryModel);


    List<ProductCategoryModel> productCategoryModelBuildList(List<ProductCategoryDO> productCategoryDOS);


    ProductCategoryModel productCategoryModelBuild(ProductCategoryDO productCategoryDO);


    List<CategoryTreeModel> treeDefinitionModelBuildList(List<ProductCategoryDO> productCategoryDOS);
}
